
<head>
   <meta charset="utf-8" />
  
</head>
    <!-- BEGIN PAGE CONTAINER--> 
    <div class="container-fluid" >
        <!-- BEGIN PAGE HEADER-->    
        <div class="row-fluid">
            <div class="span12">
               
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title">
                    财富 - GPS
                    <small id="displayTitle"></small>
                </h3>
                <ul class="breadcrumb">
                    <li>
                        <a href="index"><i class="icon-home"></i></a><span class="divider"></span>
                    </li>
                    <li>
                        <a href="#">财富 - 定位</a> <span class="divider">&nbsp;</span>
                    </li>

                </ul>
                <!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <!-- END PAGE HEADER-->
   
        <!-- BEGIN PAGE CONTENT-->
        <div class="row-fluid">
            <div class="span12">
                <div class="widget box blue" id="form_wizard_1">
                    <div class="widget-title">
                        <h4>
                            <i class="icon-reorder"></i> 财富 - 定位 <span class="step-title"> 1 of 3</span>
                        </h4>
                        <span class="tools">
                            <a href="javascript:;" class="icon-chevron-down"></a>
                            <a href="javascript:;" class="icon-remove"></a>
                        </span>
                        
                    </div>
                    <div class="widget-body form">
                        <form  class="form-horizontal" >
                            <div class="form-wizard">
                                <div class="navbar steps">
                                    <div class="navbar-inner">
                                        <ul class="row-fluid">
                                            <li class="span4">
                                                <a href="#tab1" data-toggle="tab" class="step active">
                                                    <span class="number">1</span>
                                                    <span class="desc"><i class="icon-ok"></i> 个人情况 </span>
                                                </a>
                                            </li>
                                            <li class="span4">
                                                <a href="#tab2" data-toggle="tab" class="step">
                                                    <span class="number">2</span>
                                                    <span class="desc"><i class="icon-ok"></i> 风险偏好</span>
                                                </a>
                                            </li>
                                            <li class="span4">
                                                <a href="#tab3" data-toggle="tab" class="step">
                                                    <span class="number">3</span>
                                                    <span class="desc"><i class="icon-ok"></i> 财务状况 </span>
                                                </a>
                                            </li>
                                            

                                        </ul>
                                        <h5>为了的到定制化更具参考性的方案，请尽量按照个人真实状况填写</h5>
                                    </div>
                                </div>
                                <div id="bar" class="progress progress-striped">
                                    <div class="bar"></div>
                                </div>
                                <div class="tab-content">
                                    <div class="tab-pane active" id="tab1">
                                        <h3>个人情况定位</h3>
                                        <div class="control-group">
                                            <label class="control-label" >当前年龄</label>
                                            <div class="controls">
                                                <input type="text" class="span6" placeholder="个人当前年龄" id="currentage"/>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">预期退休年龄</label>
                                            <div class="controls">
                                                <input type="text" class="span6" placeholder="个人预期退休年龄" id="retirementage"/>

                                            </div>
                                        </div>       

                                    </div>
                                    <div class="tab-pane" id="tab2">
                                        <h4>风险偏好评估</h4>
                                        <div class="control-group">
                                            <label class="control-label">投资知识</label>


                                            <div class="controls">
                                                <select class="span6 "  tabindex="1" id="investmentknowledge">
                                                    <option value="">个人投资知识</option>
                                                    <option value="1">全新人</option>
                                                    <option value="2">一般水平</option>
                                                    <option value="3">专业水准</option>                                    
                                                </select>
                                            </div>

                                        </div>


                                        <div class="control-group">
                                            <label class="control-label">投资经验</label>
                                            <div class="controls">
                                                <select class="span6 "  tabindex="1" id="investmentexperience">
                                                    <option value="">个人投资经验</option>
                                                    <option value="1">从未有过</option>
                                                    <option value="2">少于5年</option>
                                                    <option value="3">超过5年</option>                                    
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">个人投资偏好</label>
                                           <div class="controls">
                                                <select class="span6 "  tabindex="1" id="selfscore">
                                                    <option value="">个人投资偏好</option>
                                                    <option value="1">只追求低风险</option>
                                                    <option value="2">保守投资</option>
                                                    <option value="3">平衡型投资</option>     
                                                    <option value="4">激进型投资</option> 
                                                    <option value="5">股票型投资</option> 
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">卖出避险</label>
                                             <div class="controls">
                                                <select class="span6 "  tabindex="1" id="bailout">
                                                    <option value="">市场下滑时是否卖出</option>
                                                    <option value="1">不会卖出</option>
                                                    <option value="2">卖出一些</option>
                                                    <option value="3">卖出大部分</option>     
                                                    <option value="4">全部卖出</option> 
                                                    
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="tab-pane" id="tab3">
                                        <h4>财富状况评估</h4>
                                        <div class="control-group">
                                            <label class="control-label">紧急资金</label>
                                            <div class="controls">
                                                <select class="span6 "  tabindex="1" id="emergencyfund">
                                                    <option value="">紧急资金储备</option>
                                                    <option value="1">无紧急资金储备</option>
                                                    <option value="2">少于3个月储备 </option>
                                                    <option value="3">3-6个月储备</option>     
                                                    <option value="4">多于6个月储备 </option> 
                                                    
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">家庭年收入</label>
                                            <div class="controls">
                                               <select class="span6 "  tabindex="1" id="annualincome">
                                                    <option value="">家庭年收入</option>
                                                    <option value="1">少于 2万</option>
                                                    <option value="2">2 - 3万 </option>
                                                    <option value="3">3 - 7万</option>     
                                                    <option value="4">7 - 10万 </option> 
                                                    <option value="5">10 - 15万 </option>
                                                    <option value="6">15 -25万</option>     
                                                    <option value="7">25万 以上 </option>                                                    
                                                </select>

                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">基本支出</label>
                                            <div class="controls">
                                                 <select class="span6 "  tabindex="1" id="essentialexpense">
                                                    <option value="">基本支出</option>
                                                    <option value="1">少于25%年收入</option>
                                                    <option value="2">占 25% - 50% 年收入</option>
                                                    <option value="3">占 51% - 75% 年收入</option>
                                                    <option value="4">占 75% - 100% 年收入</option>  
                                                    <option value="5">100% 以上年收入 </option> 
                                                                                                        
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">整体财务状况</label>
                                            <div class="controls">
                                               <select class="span6 "  tabindex="1" id="overallsituation">
                                                    <option value="">整体财务状况</option>
                                                    <option value="1">安全</option>
                                                    <option value="2">基本安全</option>
                                                    <option value="3">不是很安全</option>
                                                    <option value="4">非常不安全</option>                                                                                                    
                                                </select>
                                            </div>
                                        </div>
                                    </div>                                    
                                </div>
                                <div class="form-actions clearfix">
                                    <a href="javascript:;" class="btn button-previous">
                                        <i class="icon-angle-left"></i> 上一步
                                    </a>
                                    <a href="javascript:;" class="btn btn-primary blue button-next">
                                        下一步<i class="icon-angle-right"></i>
                                    </a>                                  
                                     
                                </div>
                                
                            </div>
                        </form>
                         <button id="submit1" type="submit" class="btn blue"><i class="icon-ok"></i> 提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
  
   <!-- BEGIN JAVASCRIPTS -->    
   
   <script>
    $(document).ready(function() {        	
    	 App.init();
    	 var displayname=$("#displayname").val();
     	var id=$("#id").val();
         $("#displayTitle").append(displayname+"的财富导航");
         }); 
     
     $("#submit1").click(function(){	
    	 var currentage =$("#currentage").val();
       	var id=$("#id").val();
       	var retirementage=$("#retirementage").val();
       	var investmentknowledge=$("#investmentknowledge").val();
       	var investmentexperience=$("#investmentexperience").val();
       	var selfscore=$("#selfscore").val();    	
       	var bailout=$("#bailout").val();
       	var emergencyfund=$("#emergencyfund").val();
       	var annualincome=$("#annualincome").val();
       	var essentialexpense=$("#essentialexpense").val();    	
       	var overallsituation=$("#overallsituation").val();
       	
       	var data={"id":id, "currentage":currentage,"retirementage":retirementage, "investmentknowledge":investmentknowledge,"investmentexperience":investmentexperience,"selfscore":selfscore, "bailout":bailout,"emergencyfund":emergencyfund,"annualincome":annualincome,"essentialexpense":essentialexpense,"overallsituation":overallsituation};
       	   	  	
       	$.ajax({
   			type : "POST",
   			contentType : "application/json",
   			url : "/newScore",
   			data : JSON.stringify(data),
   			dataType : 'json',
   			timeout : 10000,
   			success : function(data) {
   				
   				alert("财富定位成功");
   			},
   			error : function(XMLHttpRequest, textStatus, errorThrown) {
                  alert(XMLHttpRequest.status);
                  alert(XMLHttpRequest.readyState);
                  alert(textStatus);
              },
   			done : function(e) {
   				alert("done");
   			}
   		});
       	
       	$("#pageContainer").remove();	
       	$("#main-content").load("pages/newGoalBody.html");	
     });
    
  </script>
   <!-- END JAVASCRIPTS -->   

    


